Both vitamin B12 and folic acid can be obtained through diet, but they come from different sources. Vitamin B12 is primarily found in animal products such as meat, fish, eggs, and dairy. In contrast, folic acid is present in a variety of foods, including leafy green vegetables, legumes, fruits, and fortified cereals.